moved file operations to the separate mixin module

also added after-method hooks to save repository