Don't need dev.off() in the function. 

@jread-usgs