Update cgi scripts for mongodb