initial commit of writeout.c