rewrote getFileType in fileUtils.cpp -- not tested yet