save captured photo to file