moved DB creation before script execution