Replaced all modular error messages with printf statements for formatting