Use check_call and check_output for subprocess
Remove empty spaces.