refactoring functionality for setting custom path module generator