Independent file processing function