Fixing error logging bug in folder plugin