minor fix for issue of opening file when an existing file is already open

Signed-off-by: Adam McNicol <adam@mcnicol.me>