Trim trailing whitespaces
Insert classname based on filename