wcstombs_s error checking fixed