More specific error message when unable to open file.
Made main/has_option more generic by introducing CMD_LINE_OPTION_PREFIX
Small code optimization in main()