added alternative check to determine if folder data is in the folder table
added logging, dupe folder fix