httpcheck - added error check