Throw some errors in log if something is wrong.