I will file the surface of rubber brake pads that are glazed or use the file to smooth them if they have a ridge (caused by rims that have an indentation) and then clean the rim using isopropyl alcohol. This can improve braking if the pads are still relatively pliant but not if they are old and hardened. This often provides some improvement in braking but falls short of what can be achieved by replacing the pads. Filing does not work for disc pads and I have not found a way to clean them but I do use isopropyl alcohol and sometimes Brakekleen to clean rotors. This can sometimes cure squealing but often replacement of pads and rotors is needed.