More error handling fixes

This change resolves error handling issues in get_machine_agent_id() and allows for graceful failure if bootstrap.json is the default.