Reworked already existing file logic