Added switches to spark context creation code to allow buffer size increase and increased logging for profiling.