emit open and error