Handle the exception for running the profiler