Revert "Use lambda"

This reverts commit 7b0f7cbceb8d9a664b84402e41368ef9ca232622.
Changed output path to java.io.tmpdir