Hooks for write operations