The DigitalIO is not outputting correctly to all the lines. The problem is just a logic mistake in the loop checking output type