More logging; fixed check.