Script to check if an application is running