Remove DS locks.
Change fseek ftell method for file size to fstat.