All functions now accept file-like objects only