Creating log file only if instrumenting function or loop.