in reply to Incorrect options supplied, exiting.

Try printing out $do_command after you've built and then try invoking that exact command manually. Chances are your syntax is incorrect.