Changed time generation away from ctime to avoid the \n from ctime. Log entries should now be 1 line instead of 2