Added functionality to add new records from previous maximum limit or truncate table and start adding from 0