added saving and checking paths