stdout implemented, stdin dies on assertion