Fix error where file.directory did not report changes