replaced all printf or fprintf calls in library with either WM_ERROR or WM_ERROR_NEW