use cgi for logging