Nest and format crude profiler output
Manage IR file handle properly