Added logfile support (hopefully)

Gotta wait till demo is complete to fully test it.