there is an API to create temp file - File.createTempFile(...);