Remove extraneous whitespace
Do self.log.error instead print >> sys.stderr
Move kernel starting / stopping into preprocess()