Some debugging, still trying to catch mystery shutdown