possible to move this logic to separate method - with "generate_file_name()" name