Replaced backticks with system call

Seg fault fix