Implemented automatic path generation with error output