using only in function level
move implementations to cpp files
ignore clean failure on rm command