def METHOD_NAME(path, mode="ab"):
    fd = os.open(path, os.O_CREAT | os.O_APPEND | os.O_WRONLY, 0o644)
    try:
        return os.fdopen(fd, mode)
    except OSError as e:
        log.error(e, "You might need to add whitelist folder in resultserver.py")
        os.close(fd)
        raise