Added rudimentary file check to prevent non-existent temp;late files from being used in the system by attempting to open the file. Non-existent template files are ignored.