Add bom function to determine BOM of input file