Ensure that $timestamp is only ever written out if it contains a value and let file be retained through reboots.
Ensure that $timestamp is only ever written out if it contains a value and let file be retained through reboots.