error checking in run_docker