Write in-place unless output directory given