added daemon support for unix