lw03. Output result to file