Added: Additional error logging