Have you tried running directly from the command line? If it works from the command line but not within the FE then it's obviously a problem with the flags you are sending. Sorry if this sounds overly simplistic, but starting from the bottom and working up tends to work.