added log file. autoskips invalid files.