trying to fix ava.io.IOException: Stream closed ... not success