I did something very similar to what you are doing and had a problem with error code 1013. The phone went into restore mode and come up with error code 1013l. I have a mac and had to do the following based on advice from another forum member.
On Mac:
* Open Finder
* Hold down COMMAND + SHIFT keys and press 'G'
* Enter "/private/etc/" in the field and press "Go"
* Find "hosts" file in the directory
* Drag the file to your desktop
* Open it in text editor
* Remove the line that has gs.apple.com entirely or put a # at the beginning of it to comment it out
* Save the file
* Drag it back to the /private/etc/ folder.
* You'd need to enter your username and password to authenticate the move
got it out of this thread
http://discussions.apple.com/thread....55717&tstart=0