Added free-space check

Added free-space check, looks like the db is full.