[IO] rework dprintf to take a debug level, defined in DEBUGLEVEL

printf at the moment just calls dprintf, but soon will become
a seperate I/O queue.
22 files changed