modified code to dump the times for each function in an image to a file