added option to limit parallel inserts
fixed final callback