A bit more refactoring and better logging. Also made the sums db mount point specific