Add support for store_errors and store_metadata