better output in case of exception