Fixed timer, added try-catch around logging statements so errors won't freeze the game