Re-organize file access functions.