cql_result type
better logging
correctly close connection/stream