Fixed issue with temporary files