it was writing the file to home directory - no idea why; now invoking ps using the powershell command