added some error status logging