Fix: print_error should throw error