Fixed mainfile resolve
Merge pull request #68 from uber/refactor

Fixed mainfile resolve