The system currently used could be much better using logging instead of 2 debug booleans and save in a random file with no logging level