remove trailing newlines
cast date string as str() before CSV output