more error fixing need to turn readAllFiles to a syncronous operation
Makes readAllFiles a sync operation