Fixed Factory log in case of errors