- Don't call exit() when memory allocation fails, while unlikely internal failures should not be exiting the application. - Don't print a message when the directory is empty as it's unnecessarily noisy. - Print errors the the stderr & include the reason for opendir failing.