added pinging and longer error messages