Added in auxiliary file writing.