Don't overwrite existing files. Handle socket errors more gracefully (part 1)