wrap insertion in try/catch