attempt to fix memory issue; delete file after use