File manager: add options for safe save and clean trailing whitespaces