Using debug printf and assertions