Category 4 typhoon wreaks havoc in Taiwan