callback should be called when writesteam fires finish, not on response ...

...end. 
request.on("end") fires earlier than file is actually created on disk, and sometimes, especially on slower devices you get response error.