Try to catch connection errors