Fixed deletefileIFexists not properly related to core