Log now prints to a debug.txt file.