Add hooks for read/write/cleanup