Added error checking on tranaction commit.