       dump "onChange INSERT_ROW null cache - sheet %s:'%s' rows %s.",
         sid, name, rows  if cachedRows is null
   if found
-    range = sheet.getRange "A#{rows}"
+    range = sheet.getRange "A#{getNewestRow(sheet)}"
     dump "onChange INSERT_ROW - sheet %s:'%s' rows %s (%s) range %s.",
       sid, name, rows, cachedRows, range.getA1Notation()
     setupNewRow range

  .after 1
  .create()
  dump "Enabling one shot test time trigger."
  return

testErrorTrigger = () ->

  Logger.log.apply Logger, arguments if trace
  return

# active sheet is in position 0
getActiveSheet = () ->
  ss = SpreadsheetApp.getActiveSpreadsheet()
  return ss.getSheets()[0]

setupNewRow = (range) ->
  dest = range
  row = range.getRow()
