Fix the log message bug and lp output filename bug