Updated File Handling