Better error and message / connection handling