Adding Error Handling for Window Methods