added log file and ability to resume directory download from previous partial run