Added try/catch to allow multiple attempts