add Access-Control-Allow-Origin http header for  cross domain access
add stdout and stderr log when run server as daemon