Fix for file objects reading