added multiple file support, changed patch / log behavior