Add return variables

Added returning the bin centres and frequency to use for saving output
Created function for saving data to a file