Updating output functions to ensure provided port is both open and an output port