logging and assertions