added custom errors and error logging to site