Added second variable utf8 to main output
Added encoding to lines with special characters