Merge pull request #10 from nikicat/master

write debug logs to file instead of stderr
`apt-get update` before downloading packages to avoid 404 errors