modifications so that we have better debug in case local server not working