Adapted file stream API to be compatible with the updated VFS API
 As a result, files up to 4GB should be supported now, although
 lseek only handles up to +/-2GB relative offsets