Fix non-exhaustive printDoc function