Add dynamic error message for file size
Support list of required types
Add error message if type is not correct