scanner and save to file works