logs in a dir.
fixed comments