mock instead of stub the open call