added error_mesg  and error detection to new method for docker_cmd