added timeout to ensure save completes