made input file parsing more robust, updated path directories