Add in Error Log message

Adds in php exceptions and adds error message to error log.