Updated repo, optimized file writing