Guess type
Fixed bug in implementation of file guessing