update loss saving