Refactor get_file_size