def checkArgs(args):
    """Checks the arguments and options.

    :param args: a :py:class:`argparse.Namespace` object containing the options
                 of the program.

    :type args: argparse.Namespace

    :returns: ``True`` if everything was OK.

    If there is a problem with an option, an exception is raised using the
    :py:class:`ProgramError` class, a message is printed to the
    :class:`sys.stderr` and the program exists with code 1.

    """
    # Checking the input files
    if not os.path.isfile(args.mds):
        msg = "{}: no such file".format(args.mds)
        raise ProgramError(msg)

    if not os.path.isfile(args.population_file):
        msg = "{}: no such file".format(args.population_file)
        raise ProgramError(msg)

    # Checking the chosen components
    if args.xaxis == args.yaxis:
        msg = "xaxis must be different than yaxis"
        raise ProgramError(msg)

    return True