Keep callbacks alive during the entire loop

Otherwis, deleting a filehandle in the callback of another filehandle
can result in errors and potentially even crashes.
v0.012

          Keep callbacks alive during the entire loop