Removed duplicate code & fixed parsing of file id