Save state and avoid to re-download unecessarily

Fixes #3