Made logging print in file and console with more formatting.