Extended __output_material__ boilerplate with exit codes.