[close #141] Fix checking if thumbnail exists in management command.