Changed int to bool in dict_get_weight and sort_active_file_in_place