refactored dir size monitor