Handling newlines & optional timestamp