Added some features
Separating file logic