save to sqlite database
only log to db if no file specified