added ini_set and display errors for error handling