Implemented the incompleteness detection mentioned in issue #1 and added a new argument for output file.