Clean opening input/output code