Update from master.
Re-factored createReport method. Also added checking for overwriting of file.