Initialise the hastable later to avoid having to clean it up on failure
Add missing return in error block
Refuse to overwrite existing orphan files
Make everything compile cleanly with all the warnings