Read error fixed if offset was set to end of file