Fixing relative path issue. And writing the stderr on log