DataLogger: Call removalHook before hClose

hClose fails with I/O error (which should probably be caught)