Added lastlaunch function to test if reset is required