O_DIRECT not working right, some changes to the sqlite db bootstrap