Fixing bug in file system functions.