hardcoded temp file replaced with File.createTempFile call