refs #39 replace file.exists with file.isFile()