Added some error log statements