Add log timestamp option and clean up a bit