public static function appendDataToFile($filePath, $data, $newLine = false) {
        if ($newLine) {
            file_put_contents($filePath, $data . PHP_EOL, FILE_APPEND);
        } else {
            file_put_contents($filePath, $data, FILE_APPEND);
        }
    }