Added multiple texture support and now writes metadata to a text file