added default branch for printing error