File handling, Exception Handling, and Regex