restore destination to file functionality