def exists(file_name):
    """ Checks whether a file with the given name exists. """
    try:
        f = open(file_name, "r")
        f.close()
        return True
    except FileNotFoundError:
        return False