update require relative dir logic and use case