Why don't you use create_logfile?