check for function not file
Merge pull request #392 from christianwach/1.6.x

Check for function not file