Add connection URLError handling. Some fixes