Improve output of refreshImageMetadata and refreshFileHeaders