Added a method Parse file into specific type