Fixed -b 0 option
Fix files read
Small refactoring