Added crude database support for recording i/o