passed directory instead of pwd