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

    :param args: an 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.

    """
    # Check in input file
    if not os.path.isfile(args.file):
        msg = "%s: no such file" % args.file
        raise ProgramError(msg)

    # Check the population file
    if args.population_file is None:
        msg = "population-file: no population file"
        raise ProgramError(msg)
    elif not os.path.isfile(args.population_file):
        msg = "%s: no such file" % args.population_file
        raise ProgramError(msg)

    return True
Checks the arguments and options.

    :param args: an 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.