add BOM detector when reading files
compile with java7