Changed start code for deamon mode