Try block for file and folder remove functions