def fix_file_extension(file_name, extension):
    """
        Fixes the file extensions
    """
    if not file_name.endswith('.%s' % extension):
        file_name = '%s.%s' % (file_name, extension)
    return file_name
