Added the try/catch bloxk