Added logging and saving directly from RDD