update gems
catch errors and save
save original filename of imported doc