Added proper error reporting for remote server communication errors.