fixed null pointer exception in SaveToFile activity