get_name of the file, error if the file can't be open