ima: define a new hook to measure and appraise a file already in memory