As of R2 2017 SP2 the temporary files saved to the disk or via InputStream have the .tmp extension, which could break your existing file save logic. This change is due to the security improvement explained in the Insecure Direct Object Reference article.
If the .tmp extension causes any trouble, you can strip it programmatically.