fix missing foreach variable on file collector