change structure and moving file logic