Small bug fix in gather metadata for a file function call