improved check for main file
Merge pull request #45 from gkoychev/better-main-check

improved check for main file
version 2.2.0