Added table to store bad data, update proc