pass dwd file in try-except