https://medium.com/@TechiesSpot/mastering-file-i-o-and-manipulation-in-java-examples-key-differences-and-best-practices-029cebe7054f