Always check if database exist

and delete unnecesary file