fix errors in FileSystem code