Adding new debug functionality, can now write to multiple files or print to screen