Improved loop through source files