File Handling improved