Error output, cleaned code