added possiblity to run proxy server as a daemon