correct keep_logs typos and use it in options test
fix identation
make log argument for error function optional