fixed bug which deleted pdf and doc files