Refactor marker filename making and validate paths.