remove printf debugging, fixing file perms