Added possibility to save and load weights from file