def METHOD_NAME(path, matrix, key=None):
    if key:
        raise IOError('Cannot specify "key" for TXT file')
    try:
        return np.savetxt(path, matrix)
    except Exception as e:
        raise IOError(e) from e