file like object is required, not string