fix profiler init issues with file mode