Move the last function to the Daemon.py