Add -v and -d options
cgi script fixed for new libs