Remove extra spaces in error logging