avoiding infinite loop when a problem with starting server occurs
change logging