Fix server exception on saving a file