improves newline handling for logs and handles non-string objects using str() closes #5 #7