Implement history and path saving