If shutdown is already requested we do not keep the debug log open
If shutdown is already requested we do not keep the debug log open

We also now clear the file pointer whenever the debug log is closed.

neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron