finally got working on Win and Linux, even when there are spaces in the pathname