Added File type guessing