File saving implemented and new layot