Split log into its own file, fixed some small errors.