Remove unnecessary definitions and update to check path if exists