simplify system call and prevent command injection

@steved555 @pswadi-zendesk 

### Risks
 - None