Initialize file handling and removing error