For safety, and the ability to obtain the exit status of external commands, the use of os:cmd/1,2 should be replaced with open_port({spawn_executable, Cmd}, Args).
For more info on why this is recommended see: https://security.erlef.org/secure_coding_and_deployment_hardening/external_executables.html