the $path can be long and also have several whitespaces in it. at the first expression, i used a expression to get the path starting at the first "/" and the last "/".
then it should work fine!
would you help me inserting this fix in your code? many thanks!