fix bug in ensureRunning and add missing exception cause to new exception