Check errors before rows.Close(); fix #3