Create new connection for every query and clean up the connection