added a check to prevent the 'File is being used by another process' error message
the timer now resets when the computer wakes from a sleep state