Implemented promises for reading file contents asynchronous