changed to use wchar_t for paths and filenames