added some error logs