Fix callback when piping the resized image

Now we only call the callback when the writestream is finished