use print function for python 3 compatibility
don't crash on a new branch
fix CGI handling