improved some error logs