Added memory allocation checks