added logging to fix orphans