add more debug message
fix windows daemon problem
add logfile,loglevel option