Fixed NPE when output file is not set.
Finished implementing SmartDecider (now ErrorKernelDecider), though it
needs verification.