Exception and File Handling in Python - CASE