fix help message
formatting
improve duplicate file handling
fix bug