More logging and range checking to locate crash