Fixed issues.
Added time to log messages.
Made logging work nicely.