Glad I could help
Well firslt the security issue arises from the black box syndrome. You are out sourcing data in to the black box (external program) and expect a result which is then parsed.
The problem lies in the fact that it may be fine for now. But what happens when you need to upgrade soulution change hardware ect. ,. What happens when you need to refine your solution to be more user friendly or more functional? You have to lean on that crutch (black box) in order to provide a certain level of functionality.
Last but not least you mostly likely are not privy to the code that program contains! what if there is come bug hidden away in it's code that is just itching to so itself?! If that app becomes miossion critical it will destroy whatever foundation is set around it. And could cost you down-time rushing to fix the little wheel solution.
So for those reasons I strongly suggest writting your own code. Plus it's just as fast as a c command might be. and if you REALLY need the direct writes to the drive, the code IS open source. and the it can be ammended to fit your needs from the root.
Well, keep working sounds good . That's great you are plaing ahead, kudos. lol
Well, Good luck. And let me know how it turns out,
COPE