Made the profiler working and added environment variable for activation