File management moved from macro to library

84% coverage