added file encryption to db.sqlite
minor error checking string fix