Add code for issue #9.
Refactored code.
Updated binaries in tool check.
Implemented issue #9.