replaced "/tmp" path by more generic: System.getProperty("java.io.tempdir")