updated print_file()