fix UnboundLocalError for uptime0

This can happen when the data file is empty for whatever reason. It will
now be treated like a corrupt or old data file (i.e. removed).
Merge branch 'fix-unboundlocalerror'