Check for common errors and add function to print metadata