Fix to previous commit

Fixed error_message() function so it checks the global variable for
production mode as opposed to a blank variable leading to it always
thinking it was in "dev" mode