modify "print" to "log_to_tmpfile" for checking whether it runs or not