def METHOD_NAME(file_path, text):
    try:
        os.rename(file_path, '{}.bak'.format(file_path))
    except (OSError, IOError) as o:
        IOOSErrorGracefulFail(o, "Could not rename file "
                                 "{0} to {0}.bak".format(file_path))
    save_text_to_file(text, file_path)