resolved regex bug for writeconfig function in install.php
fixed bugs and added error messages