remove empty elements from file type array