Amended open() method.