allow file-like objects for message files