More detailed error logging