Debugged generate path method