Counter variable was wrong.
Added dependencies for date migration in D7
Date migration part is removed and file migration is fixed (it was broken due to database import error ).