Hi
See here: Why is the masterkey stored in the cloud?
In short. Yes it is safe. You need the password and the masterkey file to open the vault. You cannot decrypt any file only with masterkey file.
The masterkey file has to be available next to the d folder. If you move it to an other path, you won’t be able to open your vault anymore.