detects if process is running