Add methods for logging debug info to file.