Bugfix: get colnames when using database find with csv writer
Bugfix: prevent nullpointer exception when no user agent is present in header