Adding error outputing