Move file structure check to common
Refactoring and improved logging
Changing the tmp direcory to per program directory instead of one common
That change should prevent problems while downloading more than one program