solution for the tmp files cleanup