Fixed the reading from file. problem was element not implementing Serializeable