separated file output from calculation loop; refs #8