Library for detecting file types