currently defined as int, where it should be os.FileMode
currently defined as int, where it should be os.FileMode