Have you verified with the Finder that the volume containing the file paths actually supports moving to trash? Not all volumes do.
Regarding LrFileUtils.exists(), you said "plugin exits without reason". When a plugin terminates abruptly, that's usually because an error has been thrown and not caught with pcall() or an LrFunctionContext cleanup handler. After it exits, go to FIle > Plug-In Manager, select the plugin, and look in Plug-in Author Tools for any diagnostic messages.
More generally, are you using a debugger? Trying to program a plugin without a debugger is very difficult. Either get my debugging toolkit or find the post in this forum that talks about how to connect a particular IDE's debugger to LR. If you try to debug using just print statements, you'll soon end up spending many hours in frustration, given how limited the LR execution environment is.
Thanks for the tip with the debugging toolkit, will have a look into it.
The Plugin-Manager gives me no diagnostic messages. So far I resolved the issue by executing "rm" if the plugin runs on a Mac. I've no glue why LrFileUtils.delete works fine on Win but not on Mac.
The Plugin-Manager gives me no diagnostic messages.
It generally won't unless the error occurs in the main task of the plugin. If an uncaught error occurs in other tasks or in a callback (e.g. in an LrView callback for a button action), the task will exit silently, without a message in the diagnostic log.
I guess I found the error. As I'm performing some command line tasks and folders usually contain white spaces I added quotes around the path string. So for example home = "'"' .. "/my home is my/castle" .. '"'. Quotes works fine under windows and are required for command line tasks both on Win & Mac. But neither LrFileUtils nor direct Lua IO commands like the additional quotes if used on OSX.
Will do do some more testing tomorrow and the close the issue.
Glad you identified the cause.