Fix some warnings (delete-array's typo, not initialized variable and checking return-value of open-syscall)