[IMP] Debug mode chosen by the user + little corrections in code