fixed issue with failed dump attempts

The temporary file created must be removed on failed dump attempts.
Otherwise the next attempt will fail due to file already existing.
Errors are discarded intentionally as the other error is more important.