1. Use `format % values` for that;
2. Use os.linesep instead of '\n'. Using '\n' only works for Unix.