BZ-9196 added error handling