better error logging, added memory repositories for testing