More logging and NRE fix