Some cleanup in foldermonitor