os-lib is the best option for Scala filesystem operations like appending to a file.
Here's how to append "hear me moo" to a file:
os.write.append(os.pwd/"whatever"/"file1.txt", "\nhear me moo")
os-lib is the best option for filesystem operations because it provides a unified API for all the common functions and also provides a clean API for paths. The Java APIs for filesystems require you to waste brainpower on low level details and force you to import a lot of code.
Here's a full example that creates a directory, creates a file, and then appends to the file if you'd like to experiment on your local machine:
os.makeDir(os.pwd/"whatever")
os.write(os.pwd/"whatever"/"file1.txt", "hi there")
os.write.append(os.pwd/"whatever"/"file1.txt", "\nhear me moo")