using path and asyn methods to interact with filesystem