Added details to error logging