Add function to print nested timers to file/stdout