fixing core and some tmp files