Added try and catch to statement creation