check whether the custom dir is set before mapping it