def METHOD_NAME(filename, number):
    full_path = os.path.join(os.environ["MODEL_LOG_DIR"], filename)
    txt = str(number)
    with open(full_path, mode="w", encoding="utf-8", errors="strict") as f:
        fcntl.lockf(f, fcntl.LOCK_EX)
        f.write(txt)