Updated download to write binary files

Also changed some keys