def fail(reason=nil, print_usage=false)
      case reason
      when Errno::EACCES
        STDERR.puts reason.message
        STDERR.puts "Try elevating privilege (sudo/runas) before invoking this command."
        code = 2
      when Exception
        STDERR.puts reason.message
        code = reason.respond_to?(:code) ? reason.code : 50
      when String
        STDERR.puts reason
        code = 50
      when Integer
        code = reason
      else
        code = 1
      end

      puts usage if print_usage
      exit(code)
    end
def fail(reason=nil, print_usage=false)
      case reason
      when Errno::EACCES
        STDERR.puts reason.message
        STDERR.puts "Try elevating privilege (sudo/runas) before invoking this command."
        code = 2
      when Exception
        STDERR.puts reason.message
        code = reason.respond_to?(:code) ? reason.code : 50
      when String
        STDERR.puts reason
        code = 50
      when Integer
        code = reason
      else
        code = 1
      end

      puts usage if print_usage
      exit(code)
    end
Print error on console and exit abnormally

 === Parameter
 reason(Exception|String|Integer):: Exception, error message or numeric failure code

 === Return
 R.I.P. does not return