fix for issue #19

add also a new do_open method