Log errors better