Changed Exception handling for debugging purposes