added --version opt, and identified errors