I have changed the file_format variable from an array to a list type. This allows any number of file formats to be passed.