Add more handlers & updated metadata writing