Debugging andon-cord and adding logfile capabilities