implement open() with path