Added winston logging again

- Added more error handling
- Various fixes throughout