Datalogger with interruputs
The millis() function is based on a counter which is incremented by
the Timer 0 overflow interrupt. Since you reconfigured
that timer to never overflow, that counter is not incremented anymore.

If you want to configure an Arduino timer for your own purposes, you
have to either:


use any timer other than Timer 0, or
loose the Arduino standard timekeeping functions: millis(),
micros() and delay().


I would favor the first option, especially on the Mega which has quite a
few spare timers.