Make profiling optional