Moved file deletion to IO