Moving and text file manipulation related fixes