simplify system call and prevent command injection