Added some error logs