Allow use of file-like objects.