Use strncpy rather than strcpy to prevent buffer overflow exploits. Caps max string size at FILENAMESIZ.