Added a proper check for double loaded specs and javascript files