Added checking of source file type