Made saveToDisk synchronized to allow stacked calls

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>