Use the get_singular_param_name method instead of a hardcoded "file" parameter name.

Thanks to Mark Richter for the report.