added options to change working directory