Implemented Pipeline-extensions for opening/closing files
Pipeline save-to-file code now in one place