Did you try running the tools in an interactive shell? Did you try to ECHO the exact commands executed by the script and try them manually? Are the files you try to process valid input for the applications?