Redirected stdout to log file, and added status messages

Also moved folder creation task to the beginning.