Added daemon mode (-d)