Refactored duplicate code from FileLoader
Merge pull request #5 from mishak87/patch-1

Refactored duplicate code from FileLoader