Updated to support other file extensions