TODO: fix unrecognized 'open'