Ignore 'aDir' directory.
Creating target directory if it doesn't exist.
Logging with writeln instead of write.