Added conditionals for when sqlite is available