fix write(6,*) statements