Fixed composer.json being overwritten when invalid and user answers 'n'