See I find this construct very very hard to read (in gogoduck):
                def extractOutputFilenameFromCommandLine = {
                    s ->
                    (s =~ /-u ([a-zA-Z0-9\/\.:-]+)/)[0][1]
                }