Fixed ofgwrite