Refactored duplicate code from FileLoader
tests: added unknowm macro test