Weather improves, but California wildfire still threatens 4,000 homes