Added database initialization and error management
Added field to database