fixed broken ensure_file, so that the log file gets created again