depth-cut: write to temp file and rename to avoid zero-length or invalid output files
depth-cut: write to temp file and rename to avoid zero-length or invalid output files

legacysurvey/legacypipe,legacysurvey/legacypipe