write mode entry points, plus dos file mode