Add error checking for failed mytime