adding a file existence check

to cut down on race conditions caused by editor novelties