[open] add some more checks when opening a file