Then I did this it worked. It seams like some string must be wired to the standard input (can be anything). If full path not is specified for the output file it will end up on the desktop. Perhaps it is bug in this function
Thanks, t06afre, when something connected to standard input, then it working properly. Good to know.
Many thanks to you t06afre and Andrey,
I have now 2 solutions to solve my problem.
I hope that this post will help someone else in the future