check if last opened file exists before opening it
This should fix #916.
Merge pull request #953 from chrox/fix_916

check if last opened file exists before opening it