added simple checks to not process directories and to not overwrite files that were already converted