Added try/catch to print