I do not think daemonize function is needed.

Remove it once I get time and just use setsid function.