demo and  altered file operation

Done about a puny demo and make some change to main.py which I add with
statement to codecs.open medthod.