Better input/ouput logging