add option parsing and simple file check function
fix endless loop in parse opt

dooo!
add option to show program version