partialAlign refactor: file writing.