add untested code for in-file opening