Some ErrorHandling
Documentation and debugging