some io routines
removed debug output