file move + log writing logic