Please change the default direction to input (high-z). You could potentially fry some sensor or make a short circuit if they start in output before the code changes them to input.
I have a device which controls an antique Teletype machine from a USB port. It uses the request to send signal on a USB-simulated serial port to start the Teletype motor. This works fine on Linux. On Windows, the motor starts and stops several times when the USB device is plugged in or Windows starts up. That's because an old Windows feature is probing the serial port for a serial mouse. Annoying.
An output state valid bit can be used to suppress all activation of external actuators until the software has been initialized and the state of the outputs can be safely exposed.