output parsing and writing