Capital flows: lessons from the Chilean experience