US Treasury secretary says short-term pain worth long-term security