refactored methods generating file path.