Refactoring code in dumper
Minor fix