Added in append logic, minor refactoring of file exists logic

Added in append logic, minor refactoring of file exists logic