adding '--version' and exit on invalid option. fix #413