d'oh, changed to write for out file