use tempdir for log file