Cleanup errors, footer and error iteration