Added success and fail callback for flash_callback