chdir $rel_path or die "chdir failed on $rel_path: $!\n";