honor target_dir and pass it on