Error if database is not valid, use boost for sleep()