More refactoring in check_hdd_usage()