daemonize
Added event handlers