Task/error logging fix

#### Reviewers
@jesuspg
#### Description
https://github.com/telefonicaid/fiware-sdc/issues/30
#### Testing
Unit tests passed.