replace file system calls with IFileSystem when needed