Add data to file, add debug option