change dir before executing