just before starting XML upload