How can I update file attachment and keep filename?
It is not possible. If files were deleted "in real time", node your readers see would have a link and reference to a file no longer on server's hdd.

If you need to get the same file name, remove file, save node, upload new version, save node. That way you will avoid both broken links and name conflicts.