updating fs to use promises, in case there is a race condition where the filesystem functions are called before the fs is ready
merging