re-organised deletion/header row writing as not always being written