Couldn't sleep, quickly fixed the issue where it doesn't write anything to the file, now I just need to figure out how to not overwrite the entire file.