Moved check for FQCN and directory and added tests