debugging and exceptions