Fix segment fault(use deleted memory). Add square-problem manage. Check setting file exist