IsNullOrEmpty replaced by IsNullOrWhiteSpace in some places.
Trim fileName when saving.