Ensuring that we don't attempt to reattach files

If we already have a persisted file, we don't want to attempt to
persist it again.