Update connection.rb

output error only to stderr if logger is undefined