Formating debug harmonize

Add some errors checking and debug infos