Small correction in writing op to file