check for empty target_dir