fixed argument of ofstream::open
add option to show version number
update usages and add license doc