you need some error checking code here if the user provided filename does not contain `.xmf`
in that case, we do not need to continue but should print an error message and exit instead of setting `tmp` to some invalid value