Added bit of code to check/add columns on read/exists check as well as write check, to avoid blowups on query before update