I believe string formatting is causing the error, Imoved iconv to wrap the readlines function