Fix if statement. Remove file after done.