Moved logging to separate file.