remove file() calls and close() calls