Safe method to retrieve only the name of the file.
    :param file: Path of the file to retrieve the name from.
    :return: None if the file is non-existant, otherwise the filename (extension included)
    :rtype: None, str

def get_filename(file):
    """
    Safe method to retrieve only the name of the file.
    :param file: Path of the file to retrieve the name from.
    :return: None if the file is non-existant, otherwise the filename (extension included)
    :rtype: None, str
    """
    if not os.path.exists(file):
        return None
    return "%s%s" % os.path.splitext(file)