Loop the command thread until it get interrupted