only output a file once

for some reason (debugging to come..) the same file can be saved
multiple times in db, this makes sure it’s only outputed once