Now handles segfaults by printing the stack trace and option to flush to database on each change!