debug logging to figure out why some scripts are misbehaving