checking running daemon first, after that daemonize