cleanup + error controller