added bash function to swap two files