Adding rudimentary route check and throwing 404 in case path not found