Added: Exception handling