As per https://github.com/avalonmediasystem/avalon/issues/2946 and evidenced in prod in #378, we can lose master files entirely if the copy fails. Pushing out code to only delete the user supplied master file if the copy works. This is a quick and dirty fix and can still result in broken references (see the comments in 2946) but it does prevent loss of the file.
As per https://github.com/avalonmediasystem/avalon/issues/2946 and evidenced in prod in #378, we can lose master files entirely if the copy fails. Pushing out code to only delete the user supplied master file if the copy works. This is a quick and dirty fix and can still result in broken references (see the comments in 2946) but it does prevent loss of the file.