adding error checking for bad id, added logic for mongo reboot