Added try/catch statements so that we would work without anything connected