fix metadata logging (include filename)