iReb doesn't support 3GS and that sucks. Both times ive been upgrading to iOS4 I get 1600 errors so I wanted to provide this solution. this has worked for me twice now and took me hella long to find it the second time, upgrading my 3GS to iOS4 and beating the 1600/1604 errors. It involves removing iTunes but it will keep all of you song and playlist data. Good Luck!

Unable To Restore iPhone – What Can You Do If You Are Unable To Restore iPhone