Replace useless assert comments with actual logging