move return-code retriecval to the top of the function

the timer_stop was always succesful, thereby effectively shadowing the
return-code of any previous command.
wrap return-code in brackets to separate it from the git-status