Add the code class and activate the parent::afterAction else the CSS etc do not work
check for exceptions when running in localmode
Get a dedicated directory in tmp