change snprintf to wcstombs