changed remove file method impl