explicit shutdown of kernel; fixed typo in html filename

This should address the issue with application not exiting with --html option.