Added logic to prevent the same log file being added more than once.