logging all errors
fixing db