check type clearly, instead of using path module
run test more asynchronously