Added parameter -m to limit max mem usage