moved some lines and added linked dirs for logs.