Added commit and rollback protection for insertCity()