Added factorlog for better logging