Fixed an issue with the file system

Can now write more than 500 files.