Implemented additional check if connection can be established