add tmp directory
remove trailing whitespaces