Measure time and handle insert failures in import