OUTPUT MODIFY: Improve error messages and coding style.