same as above. 
i think this code needs some clean up. you may remove this for now and later we should add proper logging.