fix empty files
replace spaces by \s+ in regex patterns