Changed panic to log.Fatal
bugfix time duration