Changed to protect Index file from accidental deletion by user
Changed error messages to be more comprehensive