File writing issues are resolved! Yay!