Fix error with file name, add formatting for output