Separated logic into master.go for low-level operations on master file, and fs.go for operations on filesystem