get_file_info function for cleaner prining of file details