Added return file-like object method